package serivce

import (
	"context"
	"petCombo-srv/dao"
	__ "petCombo-srv/proto"
)

type Pets struct {
	__.UnimplementedPetServer
}

// SayHello implements helloworld.GreeterServer
func (p *Pets) ComboList(_ context.Context, in *__.ComboReq) (*__.ComboResp, error) {

	ComboService := dao.NewComboListService()
	list, err := ComboService.ComboList(int(in.ComboId))
	if err != nil {
		return nil, err
	}

	return &__.ComboResp{
		List: list,
	}, nil
}
